Strict

Import axe3d.m3d



Rem
Type TGLMax3dDriver2 Extends TGLMax3dDriver

	Method _Open()
		vpWidth=GraphicsWidth()
		vpHeight=GraphicsHeight()
		glewInit
		glFrontFace GL_CW
		If GL_EXT_stencil_two_side
			stencilMode=1
		Else If GL_ATI_separate_stencil
			stencilMode=2
		EndIf		
		Local nopsrc$="void main(){}~n"
		For Local i=0 Until SHADER_SHADERCOUNT
			nopShaders[i]=TGLShader( CreateShader( i,nopsrc ) )
			shaders[i]=nopShaders[i]
			shadowShaders[i]=nopShaders[i]
		Next
		For Local i=0 Until MATRIX_MATRIXCOUNT
			matrices[i]=TMat4.Identity()
		Next		
	End Method

	Function Open:TGLMax3dDriver2()
		Local t:TGLMax3dDriver2=New TGLMax3dDriver2
		t._Open
		Return t
	End Function

End Type

EndRem
